media: dvb-usb-v2: lmedm04: Improve logic checking of warm start
authorMalcolm Priestley <tvboxspy@gmail.com>
Tue, 26 Sep 2017 21:10:20 +0000 (17:10 -0400)
committerYves-Alexis Perez <corsac@debian.org>
Fri, 9 Feb 2018 12:58:52 +0000 (12:58 +0000)
commitfa9f648f3c574a7855e834914209d455643d390e
tree367d3bb2c5d701add183bcb6266cdf31a0f23141
parent33def2ed344a4ad68f87f61c2496480bc3123153
media: dvb-usb-v2: lmedm04: Improve logic checking of warm start

Warm start has no check as whether a genuine device has
connected and proceeds to next execution path.

Check device should read 0x47 at offset of 2 on USB descriptor read
and it is the amount requested of 6 bytes.

Fix for
kasan: CONFIG_KASAN_INLINE enabled
kasan: GPF could be caused by NULL-ptr deref or user memory access as

Reported-by: Andrey Konovalov <andreyknvl@google.com>
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Gbp-Pq: Topic bugfix/all
Gbp-Pq: Name media-dvb-usb-v2-lmedm04-Improve-logic-checking-of-w.patch
drivers/media/usb/dvb-usb-v2/lmedm04.c